/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('uisplus', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AssociateEipRequest {
  clientToken?: string(name='ClientToken'),
  instanceId?: string(name='InstanceId'),
  networkMode?: string(name='NetworkMode'),
  regionId?: string(name='RegionId'),
  resourceMode?: string(name='ResourceMode'),
  role?: string(name='Role'),
  type?: string(name='Type'),
  uisId?: string(name='UisId'),
  uisNodeId?: string(name='UisNodeId'),
}

model AssociateEipResponseBody = {
  requestId?: string(name='RequestId'),
}

model AssociateEipResponse = {
  headers: map[string]string(name='headers'),
  body: AssociateEipResponseBody(name='body'),
}

async function associateEipWithOptions(request: AssociateEipRequest, runtime: Util.RuntimeOptions): AssociateEipResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AssociateEip',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function associateEip(request: AssociateEipRequest): AssociateEipResponse {
  var runtime = new Util.RuntimeOptions{};
  return associateEipWithOptions(request, runtime);
}

model CreateGreConnectionRequest {
  cidrs?: string(name='Cidrs'),
  clientToken?: string(name='ClientToken'),
  customerIp?: string(name='CustomerIp'),
  customerTunnelIp?: string(name='CustomerTunnelIp'),
  description?: string(name='Description'),
  localIp?: string(name='LocalIp'),
  localTunnelIp?: string(name='LocalTunnelIp'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceMode?: string(name='ResourceMode'),
  uisId?: string(name='UisId'),
}

model CreateGreConnectionResponseBody = {
  greConnectionId?: string(name='GreConnectionId'),
  requestId?: string(name='RequestId'),
}

model CreateGreConnectionResponse = {
  headers: map[string]string(name='headers'),
  body: CreateGreConnectionResponseBody(name='body'),
}

async function createGreConnectionWithOptions(request: CreateGreConnectionRequest, runtime: Util.RuntimeOptions): CreateGreConnectionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateGreConnection',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createGreConnection(request: CreateGreConnectionRequest): CreateGreConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createGreConnectionWithOptions(request, runtime);
}

model CreateUisRequest {
  clientToken?: string(name='ClientToken'),
  description?: string(name='Description'),
  networkMode?: string(name='NetworkMode'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  resourceMode?: string(name='ResourceMode'),
  singletonCount?: int32(name='SingletonCount'),
  spec?: string(name='Spec'),
  uisName?: string(name='UisName'),
}

model CreateUisResponseBody = {
  requestId?: string(name='RequestId'),
  uisId?: string(name='UisId'),
  uisNodes?: [ string ](name='UisNodes'),
}

model CreateUisResponse = {
  headers: map[string]string(name='headers'),
  body: CreateUisResponseBody(name='body'),
}

async function createUisWithOptions(request: CreateUisRequest, runtime: Util.RuntimeOptions): CreateUisResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateUis',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createUis(request: CreateUisRequest): CreateUisResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUisWithOptions(request, runtime);
}

model CreateVnetRequest {
  cidrs?: string(name='Cidrs'),
  clientToken?: string(name='ClientToken'),
  flowQuota?: int32(name='FlowQuota'),
  kppsQuota?: int32(name='KppsQuota'),
  mbpsQuota?: int32(name='MbpsQuota'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
}

model CreateVnetResponseBody = {
  requestId?: string(name='RequestId'),
  vnetId?: string(name='VnetId'),
}

model CreateVnetResponse = {
  headers: map[string]string(name='headers'),
  body: CreateVnetResponseBody(name='body'),
}

async function createVnetWithOptions(request: CreateVnetRequest, runtime: Util.RuntimeOptions): CreateVnetResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateVnet',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createVnet(request: CreateVnetRequest): CreateVnetResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVnetWithOptions(request, runtime);
}

model CreateVnetRouteEntryRequest {
  clientToken?: string(name='ClientToken'),
  destination?: string(name='Destination'),
  nexthop?: string(name='Nexthop'),
  nexthopType?: string(name='NexthopType'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model CreateVnetRouteEntryResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateVnetRouteEntryResponse = {
  headers: map[string]string(name='headers'),
  body: CreateVnetRouteEntryResponseBody(name='body'),
}

async function createVnetRouteEntryWithOptions(request: CreateVnetRouteEntryRequest, runtime: Util.RuntimeOptions): CreateVnetRouteEntryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateVnetRouteEntry',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createVnetRouteEntry(request: CreateVnetRouteEntryRequest): CreateVnetRouteEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVnetRouteEntryWithOptions(request, runtime);
}

model DeleteGreConnectionRequest {
  clientToken?: string(name='ClientToken'),
  greConnectionId?: string(name='GreConnectionId'),
  regionId?: string(name='RegionId'),
  resourceMode?: string(name='ResourceMode'),
  uisId?: string(name='UisId'),
}

model DeleteGreConnectionResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteGreConnectionResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteGreConnectionResponseBody(name='body'),
}

async function deleteGreConnectionWithOptions(request: DeleteGreConnectionRequest, runtime: Util.RuntimeOptions): DeleteGreConnectionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteGreConnection',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteGreConnection(request: DeleteGreConnectionRequest): DeleteGreConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteGreConnectionWithOptions(request, runtime);
}

model DeleteUisRequest {
  clientToken?: string(name='ClientToken'),
  regionId?: string(name='RegionId'),
  resourceMode?: string(name='ResourceMode'),
  uisId?: string(name='UisId'),
}

model DeleteUisResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteUisResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteUisResponseBody(name='body'),
}

async function deleteUisWithOptions(request: DeleteUisRequest, runtime: Util.RuntimeOptions): DeleteUisResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUis',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteUis(request: DeleteUisRequest): DeleteUisResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUisWithOptions(request, runtime);
}

model DeleteVnetRequest {
  clientToken?: string(name='ClientToken'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model DeleteVnetResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteVnetResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteVnetResponseBody(name='body'),
}

async function deleteVnetWithOptions(request: DeleteVnetRequest, runtime: Util.RuntimeOptions): DeleteVnetResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVnet',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteVnet(request: DeleteVnetRequest): DeleteVnetResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVnetWithOptions(request, runtime);
}

model DeleteVnetRouteEntryRequest {
  clientToken?: string(name='ClientToken'),
  destination?: string(name='Destination'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model DeleteVnetRouteEntryResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteVnetRouteEntryResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteVnetRouteEntryResponseBody(name='body'),
}

async function deleteVnetRouteEntryWithOptions(request: DeleteVnetRouteEntryRequest, runtime: Util.RuntimeOptions): DeleteVnetRouteEntryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVnetRouteEntry',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteVnetRouteEntry(request: DeleteVnetRouteEntryRequest): DeleteVnetRouteEntryResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVnetRouteEntryWithOptions(request, runtime);
}

model DescribeGreConnectionRequest {
  greConnectionId?: string(name='GreConnectionId'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
}

model DescribeGreConnectionResponseBody = {
  cidrs?: string(name='Cidrs'),
  createTime?: long(name='CreateTime'),
  customerIp?: string(name='CustomerIp'),
  customerTunnelIp?: string(name='CustomerTunnelIp'),
  description?: string(name='Description'),
  greConnectionId?: string(name='GreConnectionId'),
  localIp?: string(name='LocalIp'),
  localTunnelIp?: string(name='LocalTunnelIp'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  state?: string(name='State'),
  uisId?: string(name='UisId'),
  uisName?: string(name='UisName'),
}

model DescribeGreConnectionResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeGreConnectionResponseBody(name='body'),
}

async function describeGreConnectionWithOptions(request: DescribeGreConnectionRequest, runtime: Util.RuntimeOptions): DescribeGreConnectionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGreConnection',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeGreConnection(request: DescribeGreConnectionRequest): DescribeGreConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGreConnectionWithOptions(request, runtime);
}

model DescribeGreConnectionsRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
}

model DescribeGreConnectionsResponseBody = {
  greConnections?: [ 
    {
      cidrs?: string(name='Cidrs'),
      createTime?: long(name='CreateTime'),
      customerIp?: string(name='CustomerIp'),
      customerTunnelIp?: string(name='CustomerTunnelIp'),
      description?: string(name='Description'),
      greConnectionId?: string(name='GreConnectionId'),
      localIp?: string(name='LocalIp'),
      localTunnelIp?: string(name='LocalTunnelIp'),
      name?: string(name='Name'),
      state?: string(name='State'),
    }
  ](name='GreConnections'),
  page?: long(name='Page'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  state?: string(name='State'),
  totalCount?: int32(name='TotalCount'),
  uisId?: string(name='UisId'),
  uisName?: string(name='UisName'),
}

model DescribeGreConnectionsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeGreConnectionsResponseBody(name='body'),
}

async function describeGreConnectionsWithOptions(request: DescribeGreConnectionsRequest, runtime: Util.RuntimeOptions): DescribeGreConnectionsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeGreConnections',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeGreConnections(request: DescribeGreConnectionsRequest): DescribeGreConnectionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeGreConnectionsWithOptions(request, runtime);
}

model DescribeUisRequest {
  uisId?: string(name='UisId'),
}

model DescribeUisResponseBody = {
  flowQuota?: long(name='FlowQuota'),
  internetIps?: [ 
    {
      eipId?: string(name='EipId'),
      ip?: string(name='Ip'),
      role?: string(name='Role'),
      type?: string(name='Type'),
      uisNodeId?: string(name='UisNodeId'),
    }
  ](name='InternetIps'),
  kppsQuota?: long(name='KppsQuota'),
  mbpsQuota?: long(name='MbpsQuota'),
  networkMode?: string(name='NetworkMode'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
  spec?: string(name='Spec'),
  state?: string(name='State'),
  uisId?: string(name='UisId'),
  uisName?: string(name='UisName'),
  uisNodes?: [ string ](name='UisNodes'),
  usedFlowQuota?: long(name='UsedFlowQuota'),
  usedKPpsQuota?: long(name='UsedKPpsQuota'),
  usedMBpsQuota?: long(name='UsedMBpsQuota'),
  wildcardDomainState?: string(name='WildcardDomainState'),
}

model DescribeUisResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeUisResponseBody(name='body'),
}

async function describeUisWithOptions(request: DescribeUisRequest, runtime: Util.RuntimeOptions): DescribeUisResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUis',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUis(request: DescribeUisRequest): DescribeUisResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUisWithOptions(request, runtime);
}

model DescribeUissRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
}

model DescribeUissResponseBody = {
  page?: long(name='Page'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  uiss?: [ 
    {
      createTime?: long(name='CreateTime'),
      description?: string(name='Description'),
      flowQuota?: long(name='FlowQuota'),
      kppsQuota?: long(name='KppsQuota'),
      mbpsQuota?: long(name='MbpsQuota'),
      networkMode?: string(name='NetworkMode'),
      regionId?: string(name='RegionId'),
      resourceGroupId?: string(name='ResourceGroupId'),
      spec?: string(name='Spec'),
      state?: string(name='State'),
      uisId?: string(name='UisId'),
      uisName?: string(name='UisName'),
      usedFlowQuota?: long(name='UsedFlowQuota'),
      usedKPpsQuota?: long(name='UsedKPpsQuota'),
      usedMBpsQuota?: long(name='UsedMBpsQuota'),
      wildcardDomainState?: string(name='WildcardDomainState'),
    }
  ](name='Uiss'),
}

model DescribeUissResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeUissResponseBody(name='body'),
}

async function describeUissWithOptions(request: DescribeUissRequest, runtime: Util.RuntimeOptions): DescribeUissResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUiss',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUiss(request: DescribeUissRequest): DescribeUissResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUissWithOptions(request, runtime);
}

model DescribeVnetRequest {
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model DescribeVnetResponseBody = {
  cidrs?: string(name='Cidrs'),
  flowQuota?: string(name='FlowQuota'),
  kppsQuota?: string(name='KppsQuota'),
  mbpsQuota?: string(name='MbpsQuota'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId'),
  state?: string(name='State'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
  wildcardDomainState?: string(name='WildcardDomainState'),
}

model DescribeVnetResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeVnetResponseBody(name='body'),
}

async function describeVnetWithOptions(request: DescribeVnetRequest, runtime: Util.RuntimeOptions): DescribeVnetResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVnet',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeVnet(request: DescribeVnetRequest): DescribeVnetResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVnetWithOptions(request, runtime);
}

model DescribeVnetRouteEntryListRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model DescribeVnetRouteEntryListResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
  vnets?: [ 
    {
      destination?: string(name='Destination'),
      nexthop?: string(name='Nexthop'),
      nexthopType?: string(name='NexthopType'),
      uisId?: string(name='UisId'),
      vnetId?: string(name='VnetId'),
    }
  ](name='Vnets'),
}

model DescribeVnetRouteEntryListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeVnetRouteEntryListResponseBody(name='body'),
}

async function describeVnetRouteEntryListWithOptions(request: DescribeVnetRouteEntryListRequest, runtime: Util.RuntimeOptions): DescribeVnetRouteEntryListResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVnetRouteEntryList',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeVnetRouteEntryList(request: DescribeVnetRouteEntryListRequest): DescribeVnetRouteEntryListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVnetRouteEntryListWithOptions(request, runtime);
}

model DescribeVnetsRequest {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: [ string ](name='VnetId'),
}

model DescribeVnetsResponseBody = {
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
  vnets?: [ 
    {
      cidrs?: string(name='Cidrs'),
      flowQuota?: int32(name='FlowQuota'),
      kppsQuota?: int32(name='KppsQuota'),
      mbpsQuota?: int32(name='MbpsQuota'),
      name?: string(name='Name'),
      state?: string(name='State'),
      uisId?: string(name='UisId'),
      vnetId?: string(name='VnetId'),
      wildcardDomainState?: string(name='WildcardDomainState'),
    }
  ](name='Vnets'),
}

model DescribeVnetsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeVnetsResponseBody(name='body'),
}

async function describeVnetsWithOptions(request: DescribeVnetsRequest, runtime: Util.RuntimeOptions): DescribeVnetsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVnets',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeVnets(request: DescribeVnetsRequest): DescribeVnetsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVnetsWithOptions(request, runtime);
}

model DisableUisWildcardDomainRequest {
  clientToken?: string(name='ClientToken'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
}

model DisableUisWildcardDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model DisableUisWildcardDomainResponse = {
  headers: map[string]string(name='headers'),
  body: DisableUisWildcardDomainResponseBody(name='body'),
}

async function disableUisWildcardDomainWithOptions(request: DisableUisWildcardDomainRequest, runtime: Util.RuntimeOptions): DisableUisWildcardDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DisableUisWildcardDomain',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function disableUisWildcardDomain(request: DisableUisWildcardDomainRequest): DisableUisWildcardDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return disableUisWildcardDomainWithOptions(request, runtime);
}

model DisableVnetWildcardDomainRequest {
  clientToken?: string(name='ClientToken'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model DisableVnetWildcardDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model DisableVnetWildcardDomainResponse = {
  headers: map[string]string(name='headers'),
  body: DisableVnetWildcardDomainResponseBody(name='body'),
}

async function disableVnetWildcardDomainWithOptions(request: DisableVnetWildcardDomainRequest, runtime: Util.RuntimeOptions): DisableVnetWildcardDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DisableVnetWildcardDomain',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function disableVnetWildcardDomain(request: DisableVnetWildcardDomainRequest): DisableVnetWildcardDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return disableVnetWildcardDomainWithOptions(request, runtime);
}

model EnableUisWildcardDomainRequest {
  clientToken?: string(name='ClientToken'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
}

model EnableUisWildcardDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model EnableUisWildcardDomainResponse = {
  headers: map[string]string(name='headers'),
  body: EnableUisWildcardDomainResponseBody(name='body'),
}

async function enableUisWildcardDomainWithOptions(request: EnableUisWildcardDomainRequest, runtime: Util.RuntimeOptions): EnableUisWildcardDomainResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableUisWildcardDomain',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function enableUisWildcardDomain(request: EnableUisWildcardDomainRequest): EnableUisWildcardDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableUisWildcardDomainWithOptions(request, runtime);
}

model ModifyGreConnectionRequest {
  cidrs?: string(name='Cidrs'),
  clientToken?: string(name='ClientToken'),
  customerIp?: string(name='CustomerIp'),
  customerTunnelIp?: string(name='CustomerTunnelIp'),
  description?: string(name='Description'),
  greConnectionId?: string(name='GreConnectionId'),
  localIp?: string(name='LocalIp'),
  localTunnelIp?: string(name='LocalTunnelIp'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  resourceMode?: string(name='ResourceMode'),
  uisId?: string(name='UisId'),
}

model ModifyGreConnectionResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyGreConnectionResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyGreConnectionResponseBody(name='body'),
}

async function modifyGreConnectionWithOptions(request: ModifyGreConnectionRequest, runtime: Util.RuntimeOptions): ModifyGreConnectionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyGreConnection',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyGreConnection(request: ModifyGreConnectionRequest): ModifyGreConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyGreConnectionWithOptions(request, runtime);
}

model ModifyVnetRequest {
  cidrs?: string(name='Cidrs'),
  clientToken?: string(name='ClientToken'),
  flowQuota?: int32(name='FlowQuota'),
  kppsQuota?: int32(name='KppsQuota'),
  mbpsQuota?: int32(name='MbpsQuota'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId'),
  uisId?: string(name='UisId'),
  vnetId?: string(name='VnetId'),
}

model ModifyVnetResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyVnetResponse = {
  headers: map[string]string(name='headers'),
  body: ModifyVnetResponseBody(name='body'),
}

async function modifyVnetWithOptions(request: ModifyVnetRequest, runtime: Util.RuntimeOptions): ModifyVnetResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVnet',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyVnet(request: ModifyVnetRequest): ModifyVnetResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVnetWithOptions(request, runtime);
}

model UnAssociateEipRequest {
  clientToken?: string(name='ClientToken'),
  instanceId?: string(name='InstanceId'),
  networkMode?: string(name='NetworkMode'),
  regionId?: string(name='RegionId'),
  resourceMode?: string(name='ResourceMode'),
  type?: string(name='Type'),
  uisId?: string(name='UisId'),
  uisNodeId?: string(name='UisNodeId'),
}

model UnAssociateEipResponseBody = {
  requestId?: string(name='RequestId'),
}

model UnAssociateEipResponse = {
  headers: map[string]string(name='headers'),
  body: UnAssociateEipResponseBody(name='body'),
}

async function unAssociateEipWithOptions(request: UnAssociateEipRequest, runtime: Util.RuntimeOptions): UnAssociateEipResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnAssociateEip',
    version = '2020-07-07',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unAssociateEip(request: UnAssociateEipRequest): UnAssociateEipResponse {
  var runtime = new Util.RuntimeOptions{};
  return unAssociateEipWithOptions(request, runtime);
}

